<?php
/*
 * 数据获取
 * Created on 2012-10-30
 * Creater :cnluckylee
 * Creater mail:cnlucklee@gmail.com
 */
  class stat extends CI_Controller{
	public function __construct(){
		parent::__construct();

	}

	/*按搜索引擎查看*/
	public function index()
	{
		$this->stat_model->insertdata();
	}

	/*启动时加载数据*/
	public function start()
	{
		$this->anti_model->setdata();
	}

	/**
	 * 拦截弹框
	 */
	public function Attack()
	{
		$this->anti_model->Attack();
	}

	/**
	 * 满足条件将无效点击改为有效点击
	 */
	public function Anti()
	{
		$this->anti_model->Anti();
	}

	/**
	 * 将redis中的用户数据写入数据库
	 */
	public function redis2DB()
	{
		$this->anti_model->DoRedis2DB();
		echo "redis2DB Ok!";
	}

	/*清除所有redis数据*/
	public function deleteRedis()
	{
		$this->anti_model->delAllData();
		echo "Delete Ok!";
	}
  }
?>
